package cc.atliberty.structural.adapter.ex3;

import java.util.Enumeration;
import java.util.Iterator;

/**
 * @Author 元宵
 * @url www.atliberty.cc
 * @Date 2023-10-31 07:51
 * @description:
 */
public class Itermeration implements Enumeration {
    Iterator it;
    
    public Itermeration(Iterator it) {
        this.it = it;
    }
    
    @Override
    public boolean hasMoreElements() {
        return it.hasNext();
    }

    @Override
    public Object nextElement() {
        return it.next();
    }
}
